
Vue.component2('a_1_1_1_4_1', {  
    template: `
<div ref="body"  v-show="data.show_flag" min-height="10px"

:class="[

'ea_m-'+data.__style.__margin,
'ea_mx-'+data.__style.__margin_x,
'ea_my-'+data.__style.__margin_y,
'ea_mr-'+data.__style.__margin_right,
'ea_ml-'+data.__style.__margin_left,
'ea_mt-'+data.__style.__margin_top,
'ea_mb-'+data.__style.__margin_bottom,
'ea_p-'+data.__style.__padding,
'ea_px-'+data.__style.__padding_x,
'ea_py-'+data.__style.__padding_y,
'ea_pr-'+data.__style.__padding_right,
'ea_pl-'+data.__style.__padding_left,
'ea_pt-'+data.__style.__padding_top,
'ea_pb-'+data.__style.__padding_bottom,


'col-lg-'+data.col_lg,
'col-md-'+data.col_md,
'col-sm-'+data.col_sm,
'col-'+data.col,

{ 'a_1_1_1_4_1_edit': data.__style.__edit_flag__ },
]"
   
   >

   <slot name="body"></slot>
   </div>
  `,  
data:function(){  
  
    return {  
        data:{
          show_flag:true,
          col_lg: "3",
          col_md: "4",
          col_sm: "6",
          col: "12",
        }
        ,
    }    
  
  }, 
  watch:{
    
    'data.height':function(e){try{this.$refs.body.style.height=e}catch{}},
    'data.width':function(e){try{this.$refs.body.style.width=e}catch{}},
    'data.show_flag':function(ee){
      //   骨架类组件 必须的i参数 -------start------------
      // if (ee==true){this.edit_nit()}
      //   骨架类组件 必须的参数 -------end------------
    }},
    methods: {  
      //删除之前显示的插槽
      con_del:function(){
        try{this.old_con_dom.parentNode.removeChild(this.old_con_dom);}catch{}
      },
      //显示当前的插槽
      con_add:function(obj){
        let dom=obj.dom;
        // console.log("初始化容器","新建一个dom");
        let new_dom=document.createElement('div');
        if(this.data.relative=='relative'){
        }else{
            if((this.data.direction=='left')||(this.data.direction=='right')){
              new_dom.style.height="100%";
              new_dom.style.width="10px";
              new_dom.style.background="red";
              new_dom.style.zIndex="9999";
            new_dom.innerHTML="<div  style='height:100%;width:10px;background:red;z-index: 9999;'></div>"
            }else{
              
            new_dom.style.height="10px";
            new_dom.style.width="100%";
            new_dom.style.background="red";
            new_dom.style.zIndex="9999";
            new_dom.innerHTML="<div  style='height:10px;width:100%;background:red;z-index: 9999;'></div>"
            }
            new_dom.setAttribute('miaobian','1');
          if (dom !== null) {
            // console.log("在...之前插入",new_dom,dom)
            this.$refs.body.insertBefore(new_dom, dom);
          } else {
            // 如果 child_dom 是 null，则将新元素添加到 father_dom 的末尾
            this.$refs.body.appendChild(new_dom);
          }
        }
        
      this.con_del();
      this.old_con_dom=new_dom;
      },
      //查找 要插入的组件 位于哪一个插槽
      check_slot(dom){
        return 'body';//只有body这一个插槽 返回body
      }
    },  
    mounted: function () {  
    }  
  } 
  );
  